﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Linq.Expressions;
using GenericValidation.Resources;
using System.Resources;

namespace GenericValidation
{
    public static class Tagging
    {
        public static IValidator<T> OnInsert<T>(this IValidator<T> rule) where T:class
        {
            rule.Tag(ValidationSettings.InsertTag);
            return rule;
        }

        public static IValidator<T> OnUpdate<T>(this IValidator<T> rule) where T:class
        {
            rule.Tag(ValidationSettings.UpdateTag);
            return rule;
        }

        public static IValidator<T> OnDelete<T>(this IValidator<T> rule) where T:class
        {
            rule.Tag(ValidationSettings.DeleteTag);
            return rule;
        }

        public static IValidator<T> Always<T>(this IValidator<T> rule) where T:class
        {
            rule.Tag(ValidationSettings.AlwaysTag);
            return rule;
        }

    }
}
